package com.smart.manager.wiki.entities.body;

import com.smart.common.entities.core.BaseSearch;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.hibernate.validator.constraints.Length;

import javax.validation.constraints.NotBlank;
import java.io.Serializable;


/**
 * @author xiaxuqiu
 * @date 2023/03/26
 */
public class RDocAgreement {

    @Data
    @EqualsAndHashCode(callSuper = true)
    @ApiModel("RWikiAgreement1")
    public static class SearchBody extends BaseSearch {


        @ApiModelProperty("协议代码")
        private String code;


        @ApiModelProperty("协议名称")
        private String title;


    }


    @Data
    @ApiModel("RWikiAgreement2")
    public static class EditBody implements Serializable {


        @ApiModelProperty("协议代码")
        @Length(max = 30, message = "协议代码 不能超过30个字符")
        @NotBlank(message = " 协议代码  不能为空")
        private String code;

        @ApiModelProperty("协议标题")
        @Length(max = 30, message = "协议标题 不能超过10个字符")
        @NotBlank(message = " 协议标题  不能为空")
        private String title;


        @ApiModelProperty("协议正文")
        private String content;

    }


}
